<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.4"/>
<title>PHP QrCode Liblary: QRencode Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">PHP QrCode Liblary
   &#160;<span id="projectnumber">2.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.4 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="class_q_rencode-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">QRencode Class Reference<div class="ingroups"><a class="el" href="group___core_group.html">Standard API Core</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>QR Code encoder.  
 <a href="class_q_rencode.html#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:aa62a164eba8fd3538c6f0305de11350e"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_rencode.html#aa62a164eba8fd3538c6f0305de11350e">encodeRAW</a> ($intext, $notused=false)</td></tr>
<tr class="memdesc:aa62a164eba8fd3538c6f0305de11350e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Encodes input into Raw code table.  <a href="#aa62a164eba8fd3538c6f0305de11350e">More...</a><br/></td></tr>
<tr class="separator:aa62a164eba8fd3538c6f0305de11350e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a147878ef02ff3941e7d6e6c6f5cace17"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_rencode.html#a147878ef02ff3941e7d6e6c6f5cace17">encode</a> ($intext, $outfile=false)</td></tr>
<tr class="memdesc:a147878ef02ff3941e7d6e6c6f5cace17"><td class="mdescLeft">&#160;</td><td class="mdescRight">Encodes input into binary code table.  <a href="#a147878ef02ff3941e7d6e6c6f5cace17">More...</a><br/></td></tr>
<tr class="separator:a147878ef02ff3941e7d6e6c6f5cace17"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a27ea233f7e8b2252b002b3b4e81b2756"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_rencode.html#a27ea233f7e8b2252b002b3b4e81b2756">encodePNG</a> ($intext, $outfile=false, $saveandprint=false)</td></tr>
<tr class="memdesc:a27ea233f7e8b2252b002b3b4e81b2756"><td class="mdescLeft">&#160;</td><td class="mdescRight">Encodes input into PNG image.  <a href="#a27ea233f7e8b2252b002b3b4e81b2756">More...</a><br/></td></tr>
<tr class="separator:a27ea233f7e8b2252b002b3b4e81b2756"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a0cfc99f865cb401ee5f3492004a3c3ff"><td class="memItemLeft" align="right" valign="top">static&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_rencode.html#a0cfc99f865cb401ee5f3492004a3c3ff">factory</a> ($level=<a class="el" href="group___q_r___c_o_n_s_t.html#gae106d3baebd9c27c90b2abadb25df012">QR_ECLEVEL_L</a>, $size=3, $margin=4)</td></tr>
<tr class="memdesc:a0cfc99f865cb401ee5f3492004a3c3ff"><td class="mdescLeft">&#160;</td><td class="mdescRight">Encoder instances factory.  <a href="#a0cfc99f865cb401ee5f3492004a3c3ff">More...</a><br/></td></tr>
<tr class="separator:a0cfc99f865cb401ee5f3492004a3c3ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a952f848e0d1aedf5b7218e83592ef039"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a952f848e0d1aedf5b7218e83592ef039"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_rencode.html#a952f848e0d1aedf5b7218e83592ef039">$casesensitive</a> = true</td></tr>
<tr class="memdesc:a952f848e0d1aedf5b7218e83592ef039"><td class="mdescLeft">&#160;</td><td class="mdescRight"><b>Boolean</b> does input stream id case sensitive, if not encoder may use more optimal charsets <br/></td></tr>
<tr class="separator:a952f848e0d1aedf5b7218e83592ef039"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae130731ca639a1fe9548563f035d00b3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae130731ca639a1fe9548563f035d00b3"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_rencode.html#ae130731ca639a1fe9548563f035d00b3">$eightbit</a> = false</td></tr>
<tr class="memdesc:ae130731ca639a1fe9548563f035d00b3"><td class="mdescLeft">&#160;</td><td class="mdescRight"><b>Boolean</b> does input stream is 8 bit <br/></td></tr>
<tr class="separator:ae130731ca639a1fe9548563f035d00b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2c85baae052d1f81cd67797b62010665"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2c85baae052d1f81cd67797b62010665"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_rencode.html#a2c85baae052d1f81cd67797b62010665">$version</a> = 0</td></tr>
<tr class="memdesc:a2c85baae052d1f81cd67797b62010665"><td class="mdescLeft">&#160;</td><td class="mdescRight"><b>Integer</b> code version (total size) if <b>0</b> - will be auto-detected <br/></td></tr>
<tr class="separator:a2c85baae052d1f81cd67797b62010665"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1d8a2146220ba646f5d490bdaf6176a9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1d8a2146220ba646f5d490bdaf6176a9"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_rencode.html#a1d8a2146220ba646f5d490bdaf6176a9">$size</a> = 3</td></tr>
<tr class="memdesc:a1d8a2146220ba646f5d490bdaf6176a9"><td class="mdescLeft">&#160;</td><td class="mdescRight"><b>Integer</b> pixel zoom factor, multiplier to map virtual code pixels to image output pixels <br/></td></tr>
<tr class="separator:a1d8a2146220ba646f5d490bdaf6176a9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae892024b6923f1c72ffe4ace8fe68ae7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae892024b6923f1c72ffe4ace8fe68ae7"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_rencode.html#ae892024b6923f1c72ffe4ace8fe68ae7">$margin</a> = 4</td></tr>
<tr class="memdesc:ae892024b6923f1c72ffe4ace8fe68ae7"><td class="mdescLeft">&#160;</td><td class="mdescRight"><b>Integer</b> margin (silent zone) size, in code pixels <br/></td></tr>
<tr class="separator:ae892024b6923f1c72ffe4ace8fe68ae7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3054c9a6d438610f8fa79d821421b2be"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3054c9a6d438610f8fa79d821421b2be"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_rencode.html#a3054c9a6d438610f8fa79d821421b2be">$structured</a> = 0</td></tr>
<tr class="memdesc:a3054c9a6d438610f8fa79d821421b2be"><td class="mdescLeft">&#160;</td><td class="mdescRight">Structured QR codes. Not supported. <br/></td></tr>
<tr class="separator:a3054c9a6d438610f8fa79d821421b2be"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2d646d0de00efada9da517e5d95854e7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2d646d0de00efada9da517e5d95854e7"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_rencode.html#a2d646d0de00efada9da517e5d95854e7">$level</a> = <a class="el" href="group___q_r___c_o_n_s_t.html#gae106d3baebd9c27c90b2abadb25df012">QR_ECLEVEL_L</a></td></tr>
<tr class="memdesc:a2d646d0de00efada9da517e5d95854e7"><td class="mdescLeft">&#160;</td><td class="mdescRight"><b>Integer</b> error correction level <b>QR_ECLEVEL_L</b>, <b>QR_ECLEVEL_M</b>, <b>QR_ECLEVEL_Q</b> or <b>QR_ECLEVEL_H</b> <br/></td></tr>
<tr class="separator:a2d646d0de00efada9da517e5d95854e7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a19f09262acdf778b5c5900faa3b0fcd8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a19f09262acdf778b5c5900faa3b0fcd8"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_rencode.html#a19f09262acdf778b5c5900faa3b0fcd8">$hint</a> = <a class="el" href="group___q_r___c_o_n_s_t.html#gaa3452182528d53c7b65c6802ad15b772">QR_MODE_8</a></td></tr>
<tr class="memdesc:a19f09262acdf778b5c5900faa3b0fcd8"><td class="mdescLeft">&#160;</td><td class="mdescRight"><b>Integer</b> encoding hint, <b>QR_MODE_8</b> or <b>QR_MODE_KANJI</b>, Because Kanji encoding is kind of 8 bit encoding we need to hint encoder to use Kanji mode explicite. (otherwise it may try to encode it as plain 8 bit stream) <br/></td></tr>
<tr class="separator:a19f09262acdf778b5c5900faa3b0fcd8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>QR Code encoder. </p>
<p>Encoder is used by QRCode to create simple static code generators. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a147878ef02ff3941e7d6e6c6f5cace17"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QRencode::encode </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$intext</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$outfile</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Encodes input into binary code table. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramtype">String</td><td class="paramname">$intext</td><td>input text </td></tr>
    <tr><td class="paramtype">String</td><td class="paramname">$outfile</td><td>(optional) output file to save code table, if <b>false</b> file will be not saved </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><b>Array</b> binary code frame </dd></dl>

</div>
</div>
<a class="anchor" id="a27ea233f7e8b2252b002b3b4e81b2756"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QRencode::encodePNG </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$intext</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$outfile</em> = <code>false</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$saveandprint</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Encodes input into PNG image. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramtype">String</td><td class="paramname">$intext</td><td>input text </td></tr>
    <tr><td class="paramtype">String</td><td class="paramname">$outfile</td><td>(optional) output file name, if <b>false</b> outputs to browser with required headers </td></tr>
    <tr><td class="paramtype">Boolean</td><td class="paramname">$saveandprint</td><td>(optional) if <b>true</b> code is outputed to browser and saved to file, otherwise only saved to file. It is effective only if $outfile is specified. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="aa62a164eba8fd3538c6f0305de11350e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QRencode::encodeRAW </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$intext</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$notused</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Encodes input into Raw code table. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramtype">String</td><td class="paramname">$intext</td><td>input text </td></tr>
    <tr><td class="paramtype">Boolean</td><td class="paramname">$notused</td><td>(optional, not used) placeholder for similar outfile parameter </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><b>Array</b> Raw code frame </dd></dl>

</div>
</div>
<a class="anchor" id="a0cfc99f865cb401ee5f3492004a3c3ff"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static QRencode::factory </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$level</em> = <code><a class="el" href="group___q_r___c_o_n_s_t.html#gae106d3baebd9c27c90b2abadb25df012">QR_ECLEVEL_L</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$size</em> = <code>3</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$margin</em> = <code>4</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Encoder instances factory. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramtype">Integer</td><td class="paramname">$level</td><td>error correction level <b>QR_ECLEVEL_L</b>, <b>QR_ECLEVEL_M</b>, <b>QR_ECLEVEL_Q</b> or <b>QR_ECLEVEL_H</b> </td></tr>
    <tr><td class="paramtype">Integer</td><td class="paramname">$size</td><td>pixel zoom factor, multiplier to map virtual code pixels to image output pixels </td></tr>
    <tr><td class="paramtype">Integer</td><td class="paramname">$margin</td><td>margin (silent zone) size, in code pixels </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>builded <a class="el" href="class_q_rencode.html" title="QR Code encoder. ">QRencode</a> instance </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>lib/full/qrencode.php</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sun May 26 2013 14:47:13 for PHP QrCode Liblary by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.4
</small></address>
</body>
</html>
